#import <MathematicaKit/MExpr.h>

#ifdef __cplusplus
extern "C" {
#endif

#define DECLARE_SYMBOL(x)	extern MExpr* kSymbol ## x
#define DEFINE_SYMBOL(x)	MExpr* kSymbol ## x
#define INIT_SYMBOL(x)		kSymbol ## x = [MSymbol([NSString stringWithUTF8String: #x]) retain]
#define DEALLOC_SYMBOL(x)	[kSymbol ## x release]

DECLARE_SYMBOL(CocoaObject);
DECLARE_SYMBOL(False);
DECLARE_SYMBOL(Integer);
DECLARE_SYMBOL(List);
DECLARE_SYMBOL(Null);
DECLARE_SYMBOL(Real);
DECLARE_SYMBOL(Rule);
DECLARE_SYMBOL(String);
DECLARE_SYMBOL(Symbol);
DECLARE_SYMBOL(True);


extern void initGlobals();
extern void deallocGlobals();

extern NSMutableDictionary* GetSymbols();
//extern NSMutableDictionary* GetClasses();

#if __cplusplus
}
#endif

@interface NSObject (CLNSObjectAdditions)
- (MExpr*) expr;
- (MExpr*) uniqueExpr;
- (MExpr*) toExpression;
@end

@interface MExpr (CocoaObject)
- (id) cocoaObject;
@end
